
from langchain_ollama import ChatOllama

llm = ChatOllama(model="qwen2.5:7b-instruct-q5_K_S", temperature=0.2)

messages = [
    (
        "system",
        "You are a helpful assistant that translates English to Chinese. Translate the user sentence.",
    ),
    ("human", "I love programming."),
]
ai_msg = llm.invoke(messages)

print(ai_msg)
